import Vue from 'vue';
import Router from 'vue-router';


Vue.use(Router);

export default new Router({
    routes: [{
            path: '/',
            redirect: '/login'
        }, {
            path: '/index',
            component: resolve => require(['../components/common/Home.vue'], resolve),
            children: [
                {
                    path: '/',
                    component: resolve => require(['../components/page/Index.vue'], resolve)
                }, {
                    path: '/basetable',
                    component: resolve => require(['../components/page/BaseTable.vue'], resolve)
                }, {
                    path: '/vuetable',
                    component: resolve => require(['../components/page/VueTable.vue'], resolve) // vue-datasource组件
                }, {
                    path: '/baseform',
                    component: resolve => require(['../components/page/BaseForm.vue'], resolve)
                }, {
                    path: '/vueeditor',
                    component: resolve => require(['../components/page/VueEditor.vue'], resolve) // Vue-Quill-Editor组件
                }, {
                    path: '/markdown',
                    component: resolve => require(['../components/page/Markdown.vue'], resolve) // Vue-Quill-Editor组件
                }, {
                    path: '/upload',
                    component: resolve => require(['../components/page/Upload.vue'], resolve) // Vue-Core-Image-Upload组件
                }, {
                    path: '/basecharts',
                    component: resolve => require(['../components/page/BaseCharts.vue'], resolve) // vue-echarts-v3组件
                }, {
                    path: '/mixcharts',
                    component: resolve => require(['../components/page/MixCharts.vue'], resolve) // vue-echarts-v3组件
                }, {
                    path: '/city',
                    component: resolve => require(['../components/page/City.vue'], resolve) // vue-echarts-v3组件
                }, {
                    path: '/apply',
                    component: resolve => require(['../components/page/Apply.vue'], resolve) // vue-echarts-v3组件
                }, {
                    path: '/myshop',
                    component: resolve => require(['../components/page/myShop.vue'], resolve) // vue-echarts-v3组件
                }, {
                    path: '/shoplist',
                    component: resolve => require(['../components/page/ShopList.vue'], resolve) // vue-echarts-v3组件
                }, {
                    path: '/privilegeManage',
                    component: resolve => require(['../components/page/Privilege.vue'], resolve),
                }, {
                    path: '/role',
                    component: resolve => require(['../components/page/Role.vue'], resolve),
                }, {
                    path: '/user',
                    component: resolve => require(['../components/page/User.vue'], resolve),
                }, {
                    path: '/comment',
                    component: resolve => require(['../components/page/Comment.vue'], resolve),
                },
                {
                    path: '/kind',
                    component: resolve => require(['../components/page/Kind.vue'], resolve),
                }, {
                    path: '/product',
                    component: resolve => require(['../components/page/Product.vue'], resolve),
                }, {
                    path: '/property',
                    name: 'Property',
                    component: resolve => require(['../components/page/Property.vue'], resolve),
                }, {
                    path: '/propertyLabel',
                    name: 'PropertyLabel',
                    component: resolve => require(['../components/page/PropertyLabel.vue'], resolve),
                }, {
                    path: '/scoreRule',
                    component: resolve => require(['../components/page/ScoreRule.vue'], resolve),
                }, {
                    path: '/userScore',
                    component: resolve => require(['../components/page/UserScore.vue'], resolve),
                }, {
                    path: '/coupon',
                    component: resolve => require(['../components/page/coupon.vue'], resolve),
                }, {
                    path: '/couponBatchInfo',
                    component: resolve => require(['../components/page/CouponBatchInfo.vue'], resolve),
                }, {
                    path: '/SchoolList', //二手入住列表
                    component: resolve => require(['../components/page/schoolList.vue'], resolve),
                }, {
                    path: '/readme', //首页readme
                    component: resolve => require(['../components/page/readme.vue'], resolve),
                }, {
                    path: '/WithdrawSetting', //提现设置
                    component: resolve => require(['../components/page/WithdrawSetting.vue'], resolve),
                },
                // {
                //     path: '/withdrawList', //提现列表
                //     component: resolve => require(['../components/page/withdrawList.vue'], resolve),
                // },
                {
                    path: '/withdrawManage', //提现管理
                    component: resolve => require(['../components/page/withdrawManage.vue'], resolve),
                },
                {
                    path: '/serviceComplaints', //客服投诉表
                    component: resolve => require(['../components/page/serviceComplaints.vue'], resolve),
                },
                {
                    path: '/FeedbackList', //意见反馈表
                    component: resolve => require(['../components/page/FeedbackList.vue'], resolve),
                },
                {
                    path: '/advertisingManage', //广告图管理
                    component: resolve => require(['../components/page/advertisingManage.vue'], resolve),
                }, {
                    path: '/secondhandClass', //二手市场分类
                    component: resolve => require(['../components/page/SecondhandClass.vue'], resolve),
                }, {
                    path: '/SecondhandGoods', //二手商品管理
                    component: resolve => require(['../components/page/SecondhandGoods.vue'], resolve),
                },
                {
                    path: '/secondHandBanner', //二手banner广告管理
                    component: resolve => require(['../components/page/second-hand-banner.vue'], resolve),
                },
                {
                    path: '/secondHandComplaints', //二手投诉管理
                    component: resolve => require(['../components/page/second-hand-complaints.vue'], resolve),
                },
                {
                    path: '/payWaterRecords', //流水记录
                    component: resolve => require(['../components/page/pay-water-records.vue'], resolve),
                },
                {
                    path: '/orderManage', //订单管理
                    component: resolve => require(['../components/page/orderManage.vue'], resolve),
                },
                {
                    path: '/returnsManage', //退货管理
                    component: resolve => require(['../components/page/returnsManage.vue'], resolve),
                },
                {
                    path: '/shopExtractCash', //商家提现
                    component: resolve => require(['../components/page/shop-extract-cash.vue'], resolve),
                },
                {
                    path: '/shopCoupon', //商家优惠券
                    component: resolve => require(['../components/page/shop-coupon.vue'], resolve),
                },
                {
                    path: '/bannerEdit', //banner编辑
                    component: resolve => require(['../components/page/banner-edit.vue'], resolve),
                },
                {
                    path: '/handTwoList', //二手入住列表
                    component: resolve => require(['../components/page/handTwoList.vue'], resolve),
                },
                {
                    path: '/applyList', //申请列表
                    component: resolve => require(['../components/page/applyList.vue'], resolve),
                },
                {
                    path: '/handTwoApply', //二手申请列表
                    component: resolve => require(['../components/page/handTwoApply.vue'], resolve),
                },
                {
                    path: "/FeedbackForm", //平台意见反馈
                    name: 'FeedbackForm',
                    component: resolve => require(['../components/page/feedbackForm.vue'], resolve),
                },
                {
                    path: "/AboutPlatform", //关于平台
                    name: 'AboutPlatform',
                    component: resolve => require(['../components/page/aboutPlatform.vue'], resolve),
                },
                {
                    path: "/AdmissionAgreement", //入驻协议
                    name: 'AdmissionAgreement',
                    component: resolve => require(['../components/page/admissionAgreement.vue'], resolve),
                },
                {
                    path: "/schoolShopBanner", //自营banner管理
                    name: 'SchoolShopBanner',
                    component: resolve => require(['../components/page/SchoolShopBanner.vue'], resolve),
                },
                {
                    path: "/singleShopProduct", //个人店铺商品管理
                    name: 'SingleShopProduct',
                    component: resolve => require(['../components/page/singleShopProduct.vue'], resolve),
                },
                {
                    path: "/newsManage", //资讯管理
                    name: 'NewsManage',
                    component: resolve => require(['../components/page/newsManage.vue'], resolve),
                },
                {
                    path: "/editNews", //添加资讯、资讯详情
                    name: 'editNews',
                    component: resolve => require(['../components/page/editNews.vue'], resolve),
                },  
                {
                    path: "/userManage", //用户管理
                    name: 'userManage',
                    component: resolve => require(['../components/page/userManage.vue'], resolve),
                },
                {
                    path: "/userMessage", //消息
                    name: 'userMessage',
                    component: resolve => require(['../components/page/userMessage.vue'], resolve),
                },
            ]
        }, {
            path: '/login',
            component: resolve => require(['../components/page/Login.vue'], resolve)
        }, {
            path: '/merchantsett',
            component: resolve => require(['../components/page/MerchantsSettled.vue'], resolve),
        },
        {
            path: "/RegisterAll", //注册
            name: 'RegisterAll',
            component: resolve => require(['../components/page/register/register-all.vue'], resolve),
        }
    ]
})

